import React from "react";
import { Navigate } from "react-router-dom";

const withComponens = (Comp) => {
    return (props) => {
        const { title } = props
        if(title === '小蓝') {
            return <Comp {...props} />
        }
        return <Navigate to='/login' />
    }
}

export default withComponens